home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
newsgroups
/
misc.20031118-20041115
/
000354_fdc@columbia.edu_Tue Aug 10 13:55:02 2004.msg
< prev
next >
Wrap
Internet Message Format
|
2004-11-14
|
2KB
Path: newsmaster.cc.columbia.edu!not-for-mail
From: Frank da Cruz <fdc@columbia.edu>
Newsgroups: comp.protocols.kermit.misc
Subject: Re: get /command syntax help
Date: 10 Aug 2004 17:54:45 GMT
Organization: Columbia University
Lines: 28
Message-ID: <slrnchi2v5.8t0.fdc@sesame.cc.columbia.edu>
References: <HwORc.8953$nx2.3208@newsread2.news.atl.earthlink.net> <slrnchffbl.ech.fdc@sesame.cc.columbia.edu> <_q6Sc.10037$nx2.9157@newsread2.news.atl.earthlink.net>
Reply-To: fdc@columbia.edu
NNTP-Posting-Host: sesame.cc.columbia.edu
X-Trace: newsmaster.cc.columbia.edu 1092160485 3973 128.59.59.56 (10 Aug 2004 17:54:45 GMT)
X-Complaints-To: postmaster@columbia.edu
NNTP-Posting-Date: 10 Aug 2004 17:54:45 GMT
User-Agent: slrn/0.9.8.0 (SunOS)
Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:15114
On 2004-08-10, <nospam@killspam.org> <nospam@killspam.org> wrote:
:>"Frank da Cruz" <fdc@columbia.edu> wrote in message
:> REMOTE TYPE filename
:
: Thanks Frank, for the fast replay -- which answered the first goal, I
: started looking at the get /command switch when I couldn't figure out how to
: stuff the rtype output to a variable...
: -- rtype will display file contents ,
: SET QUIET ON gets rid of extraneous header/footer info but I still have to
: figure out how to stuff the filecontents into a macro or variable.
:
There is no OBVIOUS way to do this. Consider that a remote file might be
gigabytes long.
Still, there is a non-obvious way:
def xx query kermit command(cat filename)
do xx
where "cat" is the command used on the other computer to display a file's
contents (use "type" for most non-Unix systems). Defining a macro to do this
and then executing the macro is a trick to suppress display of the file on the
screen during download ("set quiet on" doesn't affect QUERY).
The result is in the \v(query) variable, unless the file is too big to fit
or it contains NUL bytes, in which case it will be truncated.
- Frank